package com.iwhalecloud.bss.kite.cucc.dataservice.mapper.other;

import com.iwhalecloud.bss.kite.dataservice.entity.OrderItemAttr;
import com.ztesoft.bss.base.extmapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OrderItemAttrMapper extends BaseMapper<OrderItemAttr> {

    List<OrderItemAttr> getOrderItemAttrByOrderIds(@Param("fieldName")String fieldName,@Param("list")List<String> list);
    
    List<OrderItemAttr> getOrderItemAttrByOrderItemId(@Param("order_item_id")String order_item_id,@Param("cust_id")String cust_id);

    Map<String, Object> getOrderItemAttrById(@Param("orderItemAttrId")String orderItemAttrId);

    List<Map<String, Object>> getOrderItemAttrByParams(Map<String, Object> param);

    //查询 order_item_attr_id根据 order_item_id 和 field_name 和 cust_id
    String queryOrderItemAttrIdByCustId(Map param);

    //更新order_item_attr表的 p_order_attr_id = 20181102 ，attr_id = 20181102
    void updateOrderItemAttr(Map param);

    String queryOrderItemAttrIdByCustIdMoreParams(@Param("orderItemId")String orderItemId, @Param("fieldName")String fieldName, @Param("custId")String custId);

    int updateOrderItemAttrMoreParams(@Param("attrId")String attrId, @Param("orderItemId")String orderItemId, @Param("orderItemAttrId")String orderItemAttrId, @Param("custId")String custId);

    int insertOrderItemAttr(Map<String, Object> params);

    String isExistOrderItemAttr(@Param("orderItemId")String orderItemId, @Param("attrCd")String attrCd);
}
